<template>
	<view>
		<view class="my-header">
			<view class="my-header-background">
				<image :src="userinfo.avatar" mode="aspectFill"></image>
			</view>
			<view class="my-header-logo">
				<view class="my-header-logo-img">
					<image :src="userinfo.avatar" mode="aspectFill"></image>
				</view>
				<text class="my-header-logo-nanme">{{userinfo.author_name}}</text>
			</view>
			<view class="my-header-info">
				<view class="my-header-info-box">
					<view class="my-header-info-box-title">关注</view>
					<text>{{userinfo.follow_count}}</text>
				</view>
				<view class="my-header-info-box">
					<view class="my-header-info-box-title">粉丝</view>
					<text>{{userinfo.fans_count}}</text>
				</view>
				<view class="my-header-info-box">
					<view class="my-header-info-box-title">积分</view>
					<text>{{userinfo.integral_count || 0}}</text>
				</view>
			</view>
		</view> 
		<view class="my-content">
			<view class="my-content-item" @click="open">
				<view class="my-content-item-tile">
					<uni-icons type="contact" size="20" color="#666"></uni-icons>
					<text>我的文章</text>
				</view>
				<uni-icons type="arrowright" size="24" color="#666"></uni-icons>
			</view>
			<view class="my-content-item" @click="feedback">
				<view class="my-content-item-tile">
					<uni-icons type="help" size="20" color="#666"></uni-icons>
					<text>意见反馈</text>
				</view>
				<uni-icons type="arrowright" size="24" color="#666"></uni-icons>
			</view>
		</view>
	</view>
</template>

<script>
	import {mapState} from 'vuex'
	export default {
		data() {
			return {
				
			}
		},
		computed:{
			...mapState(['userinfo'])
		},
		onLoad() {
		},
		methods: {
			feedback(){
				uni.navigateTo({
					url:'../../feedback/feedback'
				})
			},
			open(){
				uni.navigateTo({
					url:'../../my-article/my-article'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	page{
		background-color: #F5F5F5;
	}
	.my-header{
		padding-bottom: 15px;
		position: relative;
		.my-header-background{
			position: absolute;
			top: 0;
			left: 0;
			right: 0;
			bottom: 0;
			filter: blur(8px);
			opacity: .3;
			image{
				width: 100%;
				height: 100%;
			}
		}
		.my-header-logo{
			display: flex;
			flex-direction: column;
			align-items: center;
			padding-top: 30px;
			.my-header-logo-img{
				width: 60px;
				height: 60px;
				border-radius: 50%;
				overflow: hidden;
				image{
					width: 100%;
					height: 100%;
				}
			}
			.my-header-logo-nanme{
				margin-top: 15px;
				font-size: 16px;
				font-weight: bold;
			}
		}
		.my-header-info{
			margin-top: 15px;
			display: flex;
			.my-header-info-box{
				width: 100%;
				display: flex;
				flex-direction: column;
				justify-content: center;
				align-items: center;
				font-size: 12px;
				color: #999;
				.my-header-info-box-title{
					font-size: 14px;
					color: #333;
				}
			}
		}
	}
	.my-content{
		.my-content-item{
			display: flex;
			justify-content: space-between;
			padding: 15px;
			margin-bottom: 10px;
			background-color: #FFFFFF;
			color: #333333;
			font-size: 14px;
			.my-content-item-tile{
				display: flex;
				align-items: center;
				color: #000000;
				text{
					margin-left: 10px;
				}
			}
		}
	}
</style>
